package com.itheima.fuxichengxu;

public class SUM2 {
    public static void main(String[] args) {
        int sum = 0;
        for (int i = 1; i <= 5 ; i++) {
            //用赋值运算符
            sum += i;
        }
        System.out.println(sum);
        System.out.println("-------------");
        int sum1 = 0;
        for (int i = 1; i <= 5 ; i++) {
            //用普通加法运算
            sum1 = sum1 + i;
        }
        System.out.println(sum1);
    }
}
